View Object

Sample Code - View Object

The View Object is returned when previewing a report. A View represents a single view on the report. A View always lives inside a window. While there are two types of views available in Crystal Reports (Design and Preview), the Crystal Report Engine supports only the Preview window view. This object holds on to the Report Object, then releases it when it is destroyed.

A View object is created when a report is first generated and displayed in the Preview window. If a user drills down on summary values or on graph data, additional View objects are created as additional drill-down views appear in the Preview window. Each Preview tab that appears in the Preview window represents a separate View object. Only the View object for the currently active Preview tab can be manipulated at runtime.

View Object Properties

Property Description Read/Write

Application

Returns a reference to the Application Object, that this object is associated with.

Read only

DisplayedPage
Number

Returns the page number currently displayed in the current view. You will receive an incorrect result if you try to obtain this value immediately after using a method such as ShowNextPage Method (View Object), that causes a change to the Preview window. Call the Visual Basic function, DoEvents (see Visual Basic documentation for more information) before requesting the page number display.

Read only

Parent

Reference to the Parent object Window Object).

Read only

Report

Reference to Report Object.

Read only



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com